using System;
using UnityEngine;
using UnityEngine.UI;

namespace CGF
{
    //该脚本自动生成或覆盖，不可编辑
    public partial class PanelNotice
    {   
		public CButton BtnBack;
		public Text Title;
		public ScrollView ScrollView;
		public Texture2D icon_laba;
		public Texture2D icon_jiqi;
		public I18N i18n;

        public Reference reference { get; private set; }
        public Action onProsBindCompleted;
        
        public void BindProperties(Transform transform)
        {   
            reference = transform.GetComponent<Reference>();
            if(!reference)return;
            int nodeIndex = 0;
			BtnBack = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<CButton>();
			Title = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<Text>();
			ScrollView = (reference.nodes[nodeIndex++].obj as GameObject).GetComponent<ScrollView>();
			icon_laba = reference.nodes[nodeIndex++].obj as Texture2D;
			icon_jiqi = reference.nodes[nodeIndex++].obj as Texture2D;
			i18n = transform.GetComponent<I18N>();
            onProsBindCompleted?.Invoke();
        }
        
        public void SetProsBindCompletedAction(Action action)
        {
            onProsBindCompleted = action;
        }

		public string I18N_empty_tip { get { return i18n.GetTextByKey("empty_tip"); } }
		public string I18N_system_msg { get { return i18n.GetTextByKey("system_msg"); } }
		public string I18N_device_msg { get { return i18n.GetTextByKey("device_msg"); } }
		public string I18N_device_content { get { return i18n.GetTextByKey("device_content"); } }
		public string I18N_buy { get { return i18n.GetTextByKey("buy"); } }
		public string I18N_renew { get { return i18n.GetTextByKey("renew"); } }
    }
}
